namespace TXLooker.WorkItemExtention.WIQL
{
    using System;

    public static class ArithmeticalOperators
    {
        private static string[] s_Strings = new string[] { "+", "-" };

        public static Arithmetic Find(string s)
        {
            return (Arithmetic) (Array.IndexOf<string>(s_Strings, s) + 1);
        }

        public static string GetString(Arithmetic c)
        {
            return s_Strings[((int) c) - 1];
        }

        public static bool IsValid(string s)
        {
            return (Find(s) != Arithmetic.None);
        }
    }
}

